package com.csweimei.rentmanagementtreasure.pop;

import android.content.Context;
import android.view.View;

import com.lxj.xpopup.XPopup;
import com.lxj.xpopup.core.BasePopupView;
import com.lxj.xpopup.interfaces.SimpleCallback;

public class PopUtils {
    public static void showPop(Context context, BasePopupView popupView,boolean moveUpToKeyboard){
        new XPopup.Builder(context)
                .autoFocusEditText(false)
                .moveUpToKeyboard(moveUpToKeyboard)//如果不加这个，评论弹窗会移动到软键盘上面
                .enableDrag(true)
                .asCustom(popupView)
                .show();
    }




    public static void showAttachPop(Context context, View view, BasePopupView popupView){
        new XPopup.Builder(context)
                .atView(view)
                .moveUpToKeyboard(false)//如果不加这个，评论弹窗会移动到软键盘上面
                .enableDrag(true)
                .hasShadowBg(false)
                .asCustom(popupView)
                .show();
    }
}
